/**
 *
 * Created by lrs on 2018/1/1.
 */
public class TxtHandle {
    private String startStr = ""; // 开始字符串
    private int startNum = 1; // 第几个开始字符串
    private String endStr = ""; // 结束字符串
    private int endNum = 1; // 第几个结束字符串
    private boolean replaceStartStrAndEndStr = true; // 连同开始字符串和结束字符串一同替换
    private String replaceText = ""; // 替换成的字符串

    /**
     * 返回开始字符串
     * @return
     */
    public String getStartStr() {
        return startStr;
    }

    /**
     * 设置开始字符串
     * @param startStr
     */
    public void setStartStr(String startStr) {
        this.startStr = startStr;
    }

    /**
     * 返回第几个开始字符串
     * @return
     */
    public int getStartNum() {
        return startNum;
    }

    /**
     * 设置第几个开始字符串
     * @param startNum
     */
    public void setStartNum(int startNum) {
        this.startNum = startNum;
    }

    /**
     * 返回结束字符串
     * @return
     */
    public String getEndStr() {
        return endStr;
    }

    /**
     * 设置结束字符串
     * @param endStr
     */
    public void setEndStr(String endStr) {
        this.endStr = endStr;
    }

    /**
     * 返回第几个结束字符串
     * @return
     */
    public int getEndNum() {
        return endNum;
    }

    /**
     * 设置第几个结束字符串
     * @param endNum
     */
    public void setEndNum(int endNum) {
        this.endNum = endNum;
    }

    /**
     * 返回连同开始字符串和结束字符串一同替换
     * @return
     */
    public boolean isReplaceStartStrAndEndStr() {
        return replaceStartStrAndEndStr;
    }

    /**
     * 设置连同开始字符串和结束字符串一同替换
     * @param replaceStartStrAndEndStr
     */
    public void setReplaceStartStrAndEndStr(boolean replaceStartStrAndEndStr) {
        this.replaceStartStrAndEndStr = replaceStartStrAndEndStr;
    }

    /**
     * 返回替换成的字符串
     * @return
     */
    public String getReplaceText() {
        return replaceText;
    }

    /**
     * 设置替换成的字符串
     * @param replaceTextFileName 需要替换字符串的文件名
     */
    public void setReplaceText(String replaceTextFileName) {
        this.replaceText = HandleFile.readFile(replaceTextFileName);
    }
}
